package com.zhao.shallowClone;

import com.zhao.shallowClone.pojo.Dog;
import com.zhao.shallowClone.pojo.Person;

import java.util.Date;

//浅拷贝
public class ShallowClone {
    public static void main(String[] args) {
        Dog dog = new Dog("花花", 12);
        Person person = new Person("张三", dog);

        Person clone = (Person) person.clone();

        System.out.println(person.getPet() == clone.getPet());

    }
}
